#ifndef _SOR_H_
#define _SOR_H_

#include "../n_workers.h"
#include "dimensions.h"

#define CBASE_IN  0x6000 
#define CBASE_OUT 0x8000




#define RED 0
#define BLACK 1

#define INIT_CHANNEL 0x101010

typedef struct init_data{
	uint64_t cTopIn;
	uint64_t cTopOut;
	uint64_t cBottomIn;
	uint64_t cBottomOut;
	int width;
	int height;
	int stribe;
	int color;
	char dummy[80];
} init_data_t __attribute__ ((aligned(128)));

void printMatrix(float* A, int rows, int cols, char* msg, int id)
{
	int r,c;

	printf("(%d,%d) array @ %p: '%s' from pid=%i\n", rows, cols, A, msg, id);
	for (r=0; r<rows; r++) {
		for (c=0; c<cols; c++) {
			printf(" %4.0f", A[r*cols + c]);
		}
		printf("\n");
	}
}


#endif
